package com.atguigu.springcloud.service;

import com.atguigu.springcloud.entities.CommonResult;
import com.atguigu.springcloud.entities.Payment;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @Author : 李红磊
 * @Date : 2021/05/15/14:10
 * @Description :
 */
@Component
@FeignClient(value = "CLOUD-PAYMENT-SERVICE")//指定微服务
public interface PaymentFeignService {

    @GetMapping("/payment/get/{id}")
    //这是微服务对外暴露的服务，既然暴露了，那么我们就调用
    CommonResult<Payment> getPaymentById(@PathVariable("id") Long id);

}
